package com.oba.king.datalib.paymenttype;

import com.oba.base.dao.BaseDao;
import com.oba.base.interfaces.IHsqlBuilder;

public class PaymentTypeDao extends BaseDao{

	public IHsqlBuilder findAll(){
		return getSqlBuilder("from PaymentType pt order by pt.paymentTypeName");
	}
	
public IHsqlBuilder findByPaymentName(String name){
		
		IHsqlBuilder sql =getSqlBuilder("from PaymentType pt");
		sql.add("pt.paymentTypeName like ?",name,"%","%");
		sql.addend("order by pt.paymentTypeName");
		return sql; 
	}
}
